package control;

import System.SysMode;
import System.SystemObject;
import System.MainControl;

/**Remove Exam from DB CONTROL*/
public class RemoveExamControl extends abstractControl {
	private SystemObject container;

	
	public RemoveExamControl(){}
	
		@Override
		public boolean sendToServer(Object obj) 
		{
			boolean result = true;
			MainControl.client.send(obj);
			container = (SystemObject) MainControl.client.getResult();
			/**if the server had trouble connecting the database or had returned false*/
			if (container.getMode() == SysMode.NOT_OK)
				return false;
			else 
				return true;
		}

	
	/**
	 * 
	 * @return container with the last data from the data base
	 */
	public SystemObject GetSysObj()
	{
		return container;
	}
}
